package com.wmyg.antifake.enums;

public enum PackLevels {

    /**
     * 袋
     */
    PACK_LEVEL_0("袋", "D"),

    /**
     * 盒
     */
    PACK_LEVEL_1("盒", "H"),

    /**
     * 箱
     */
    PACK_LEVEL_2("箱", "X");

    private String chn;

    private String eng;

    public String getChn() {
        return chn;
    }

    public String getEng() {
        return eng;
    }

    private PackLevels(String chn, String eng) {
        this.chn = chn;
        this.eng = eng;
    }

    public static PackLevels getLevel(String chn) {
        for (PackLevels packLevels:
             PackLevels.values()) {
            if (packLevels.chn.equals(chn)) {
                return packLevels;
            }
        }
        return PACK_LEVEL_0;
    }

}
